package fr.alma.trajectory.commons;

import java.util.ArrayList;
import java.util.List;

public class Losange extends ASpaceObject implements SpaceObject {

	/**
	 * Le 4eme point
	 */
	private SpacePoint p4;
	
	public Losange(SpacePoint pointA, SpacePoint pointB, SpacePoint pointC, SpacePoint pointD) {
		super(pointA, pointB, pointC);
		p4 = pointD;
	}
	
	@Override
	public boolean isLosange(){
		return true;
	}
	
	@Override
	public List<SpacePoint> getSpacePoints(){
		List<SpacePoint> points = new ArrayList<SpacePoint>();
		points.add(getPoint1());
		points.add(getPoint2());
		points.add(getPoint3());
		points.add(p4);
		return points;
	}
	
	@Override
	public String toString(){
		return p1+""+p2+""+p3+""+p4;
	}

}
